package org.victoria.market.domain;

import org.apache.ibatis.type.Alias;

import java.util.List;
import java.util.Set;

/**
 * Created by thanatos on 15-9-13.
 */
@Alias("Category")
public class Category {

    //field
    private Long id;
    private String name;
    private Integer level;    // 1-->顶级分类，2-->二级分类 。。。

    //many to one
    private Category parent;

    //many to many
    private List<Goods> goodses;

    //one to many
    private List<CtgAttribute> ctgattrs;
    private List<Category> children;


    //get and set
    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public List<CtgAttribute> getCtgattrs() {
        return ctgattrs;
    }

    public void setCtgattrs(List<CtgAttribute> ctgattrs) {
        this.ctgattrs = ctgattrs;
    }

    public Category getParent() {
        return parent;
    }

    public void setParent(Category parent) {
        this.parent = parent;
    }

    public List<Goods> getGoodses() {
        return goodses;
    }

    public void setGoodses(List<Goods> goodses) {
        this.goodses = goodses;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Category> getChildren() {
        return children;
    }

    public void setChildren(List<Category> children) {
        this.children = children;
    }
}
